<!DOCTYPE html>
<html lang="zh">
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>联系人列表</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css">
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css">
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>

    <link rel="stylesheet" href="/css/skin.css">
    <link rel="stylesheet" href="/css/contactManager/contactForm.css">
</head>
<body>
<div class="container-fluid">
    <!-- 0-超管 1-普通管理员-->
    <input type="text" class="hidden" id="isAdmin" th:value="${admin}">
    <div class="card">
        <div class="card-header">
            <h1>联系人列表</h1>
        </div>
        <div class="card-body">
            <div class="selector-box">
                <dl class="box1">
                    <input type="hidden" id="industry">
                    <dt>行业：</dt>


                    <dd><a href="JavaScript:void(0);" class="active" onclick="searchCustomerPoolList(this, 0,'')" id="unlimited">不限</a></dd>
                    <!--                    <dd class="more">更多</dd>-->
                </dl>
                <dl class="box2">
                    <input type="hidden" id="provinceId">
                    <dt>地区：</dt>

                    <dd><a href="JavaScript:void(0);" class="active" onclick="searchCustomerPoolList(this, 1,'')">不限</a></dd>
                </dl>

                <dl class="box3">
                    <input type="hidden" id="currentIntention">
                    <dt>意向：</dt>

                    <dd><a href="JavaScript:void(0);" class="active" onclick="searchCustomerPoolList(this, 2,'')">不限</a></dd>
                    <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 2,'0')">有意向</a></dd>
                    <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 2,'1')">无意向</a></dd>
                </dl>
                <div class="collapse" id="screenBox">

                    <dl class="box6">
                        <input type="hidden" id="dateTypeID">
                        <input type="hidden" id="monthID">
                        <dt>月份：</dt>
                        <dd><a href="JavaScript:void(0);" class="active" onclick="searchCustomerPoolList(this, 9,'')">不限</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 9,'01')">一月</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 9,'02')">二月</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 9,'03')">三月</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 9,'04')">四月</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 9,'05')">五月</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 9,'06')">六月</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 9,'07')">七月</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 9,'08')">八月</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 9,'09')">九月</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 9,'10')">十月</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 9,'11')">十一月</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 9,'12')">十二月</a></dd>
                    </dl>
                    <dl class="box4">
                        <input type="hidden" id="contactPosition">
                        <dt>职务：</dt>
                        <dd><a href="JavaScript:void(0);" class="active" onclick="searchCustomerPoolList(this, 3,'')">不限</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 3,'0')">公司管理</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 3,'1')">财务</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 3,'2')">人力</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 3,'3')">其他</a></dd>
                    </dl>
                    <dl class="box5">
                        <input type="hidden" id="onTheJobSituation">
                        <dt>其他：</dt>
                        <dd><a href="JavaScript:void(0);" class="active"
                               onclick="searchCustomerPoolList(this, 4,'')">不限</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 4,'0')">在职</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 4,'1')">离职</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 4,'2')">会员企业</a></dd>
                        <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(this, 4,'3')">非会员企业</a></dd>
                    </dl>
                </div>
                <p class="collapse-bar">
                    <a class="btn-screen" role="button" data-toggle="collapse" href="#screenBox" aria-expanded="false" aria-controls="screenBox"><i class="mdi mdi-chevron-double-down"></i>展开</a>
                </p>
            </div>
            <div class="row content-action">
                <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
                    <!--全部 本周 本月-->
                    <div class="time-search pull-left">
                        <input type="hidden" id="dateType" name="dateType"/>
                        <div class="all active-second" onclick="selectTime('all')">全部</div>
                        <div class="week" onclick="selectTime('week')">本周</div>
                        <div class="month" onclick="selectTime('month')">本月</div>
                    </div>
                </div>
                <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">
                    <div class="pull-right reset-style">
                        <div class="pull-left contact-category">
                            <select name="contactCategory" id="contactCategory" class="form-control">
                                <option>全部联系人</option>
                                <option>只显示可用</option>
                                <option>只显示作废</option>
                                <option>只显示常用联系人</option>
                            </select>
                        </div>
                        <button class="btn btn-default" data-toggle="collapse" data-target="#filterContent"
                                aria-expanded="false" aria-controls="filterContent"><i class="mdi mdi-sort-variant"></i>高级筛选
                        </button>
                        <div class="min-search pull-left" style="margin-left: 12px;">
                            <input class="form-control" type="text" placeholder="请输入联系人姓名"
                                   id="contactName" name="contactName">
                            <button class="btn btn-primary" type="button" id="searchTwo"
                                    onclick="searchCustomerPoolList(this, 5,'')">
                                <i class="mdi mdi-magnify"></i><span>搜索</span>
                            </button>
                        </div>
                        <!--<div class="btn-group pull-left">
                            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">联系人分类 <span class="caret"></span></button>
                            <ul class="dropdown-menu dropdown-menu-right">
                                <li><a href="#!" onclick="searchCustomerPoolList(this, 7)">全部</a></li>
                                <li role="separator" class="divider"></li>
                                <li><a href="#!" onclick="searchCustomerPoolList(this, 7,'1')">只显示可用</a></li>
                                <li><a href="#!" onclick="searchCustomerPoolList(this, 7,'2')">只显示作废</a></li>
                                <li><a href="#!" onclick="searchCustomerPoolList(this, 8,'0')">只显示常用联系人</a></li>
                            </ul>
                        </div>-->
                        <button type="button" class="btn btn-success" onclick="addContact()"><i
                                class="mdi mdi-plus-circle-outline"></i>新增联系人
                        </button>
                    </div>
                </div>
            </div>
            <!--高级搜索内容-->
            <div class="collapse filter-content" id="filterContent">
                <div class="row">
                    <div class="form-group col-lg-3 col-md-3 col-sm-6 col-xs-12">
                        <label for="custName">客户名称</label>
                        <div>
                            <input placeholder="请输入客户名称" name="custName" id="custName" type="text" class="form-control"
                                   autocomplete="off">
                        </div>
                    </div>
<!--                    <div class="form-group col-lg-3 col-md-3 col-sm-6 col-xs-12">-->
<!--                        <label for="contactInformation">联系方式</label>-->
<!--                        <div>-->
<!--                            <input placeholder="请输入联系方式" name="contactInformation" id="contactInformation" type="text"-->
<!--                                   class="form-control" autocomplete="off">-->
<!--                        </div>-->
<!--                    </div>-->
                    <div class="form-group col-lg-3 col-md-3 col-sm-6 col-xs-12">
                        <label for="abolishState">废止状态</label>
                        <div>
                            <select class="form-control" id="abolishState" name="abolishState" type="text"
                                    title="请选择废止状态" data-live-search="true">
                                <option value="">请选择废止状态</option>
                                <option value="1">无废止</option>
                                <option value="2">废止</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-lg-3 col-md-3 col-sm-6 col-xs-12">
                        <label>&nbsp;</label>
                        <div class="text-right">
                            <button class="btn btn-primary" type="button" id="search"
                                    onclick="searchCustomerPoolList(this, 6,'')"><i
                                    class="mdi mdi-magnify"></i><span>搜索</span></button>
                            <button class="btn btn-default" id="btn-reset">重置</button>
                        </div>
                    </div>
                </div>
            </div>
            <table id="contactList" class="contactList"></table>
        </div>
    </div>
</div>
<!-- 修改联系人 -->
<div class="modal fade" tabindex="-1" role="dialog" id="editModel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4>修改联系人信息</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal">
                    <div class="form-group">
                        <label class="control-label col-xs-3">姓名</label>
                        <div class="col-xs-7">
                            <input id="contactNameLxr" type="text" class="form-control" disabled="disabled">
                            <input id="contactIdLxr" type="hidden">
                            <input id="customerIdLxr" type="hidden">
                            <input id="contactNatureLxr" type="hidden">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-3">职务</label>
                        <div class="col-xs-7">
                            <select class="form-control" id="contactPositionLxr" title="请选择">
                                <option value="">请选择</option>
                                <option value="0">公司管理</option>
                                <option value="1">财务</option>
                                <option value="2">人力</option>
                                <option value="3">其他</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-3">在职情况</label>
                        <div class="col-xs-7">
                            <select class="form-control" id="onTheJobSituationLxr" title="请选择">
                                <option value="0">在职</option>
                                <option value="1">离职</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-3">联系方式</label>
                        <div class="col-xs-7">
                            <input type="text" id="contactInformationLxr" class="form-control" disabled="disabled">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-3">邮箱</label>
                        <div class="col-xs-7">
                            <input maxlength="20" id="mailBoxLxr" type="text" class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-3">微信</label>
                        <div class="col-xs-7">
                            <input maxlength="20" id="wxLxr" type="text" class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-3">家庭住址</label>
                        <div class="col-xs-7">
                            <input maxlength="20" id="homeAddressLxr" type="text" class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-3">公司地址</label>
                        <div class="col-xs-7">
                            <input maxlength="20" id="companyAddressLxr" type="text" class="form-control">
                        </div>
                    </div>
                </form>
                <!--<div class="well form-well">
                    <div class="row">
                        <div class="col-xs-6">
                            <label class="control-label">姓名</label>
                            <div class="form-content">
                                <input id="contactNameLxr" type="text" class="form-control" disabled="disabled">
                                <input id="contactIdLxr" type="hidden">
                                <input id="customerIdLxr" type="hidden">
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <label class="control-label label-required">职务</label>
                            <div class="form-content">
                                <select class="form-control" id="contactPositionLxr" title="请选择">
                                    <option value="">请选择</option>
                                    <option value="0">公司管理</option>
                                    <option value="1">财务</option>
                                    <option value="2">人力</option>
                                    <option value="3">其他</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <label class="control-label label-required">在职情况</label>
                            <div class="form-content">
                                <select class="form-control" id="onTheJobSituationLxr" title="请选择">
                                    <option value="0">在职</option>
                                    <option value="1">离职</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <label class="control-label">联系方式</label>
                            <div class="form-content">
                                <input type="text" id="contactInformationLxr" class="form-control" disabled="disabled">
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <label class="control-label label-required">邮箱</label>
                            <div class="form-content">
                                <input maxlength="20" id="mailBoxLxr" type="text" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <label class="control-label label-required">微信</label>
                            <div class="form-content">
                                <input maxlength="20" id="wxLxr" type="text" class="form-control">
                            </div>
                        </div>
                    </div>
                </div>-->
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="updateContact();">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.min.js"></script>
<script src="/js/crm/common/city.js"></script>
<script src="/js/crm/common/common.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<script type="text/javascript" src="/js/bootstrap.lyear.dropdowntree.min.js"></script>

<!-- 子页面公用js -->
<script src="/js/crm/common/pageCommon.js"></script>
<script src="/js/crm/contactManager/contactForm.js"></script>
</html>